home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH10 / 10-4-4.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-18  |  1.8 KB  |  57 lines

  1. VERSION 5.00
  2. Begin VB.Form frm10_4_4 
  3.    Caption         =   "10.4 Example 4"
  4.    ClientHeight    =   2640
  5.    ClientLeft      =   1155
  6.    ClientTop       =   1470
  7.    ClientWidth     =   2520
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    PaletteMode     =   1  'UseZOrder
  19.    ScaleHeight     =   2640
  20.    ScaleWidth      =   2520
  21.    Begin VB.PictureBox picOutput 
  22.       Height          =   1815
  23.       Left            =   120
  24.       ScaleHeight     =   1755
  25.       ScaleWidth      =   2235
  26.       TabIndex        =   1
  27.       Top             =   720
  28.       Width           =   2295
  29.    End
  30.    Begin VB.CommandButton cmdDraw 
  31.       Caption         =   "Draw Quadrants"
  32.       Height          =   495
  33.       Left            =   480
  34.       TabIndex        =   0
  35.       Top             =   120
  36.       Width           =   1575
  37.    End
  38. Attribute VB_Name = "frm10_4_4"
  39. Attribute VB_GlobalNameSpace = False
  40. Attribute VB_Creatable = False
  41. Attribute VB_PredeclaredId = True
  42. Attribute VB_Exposed = False
  43. Private Sub cmdDraw_Click()
  44.   Dim c As Single
  45.   'Draw quarters of circle and paint upper-left quadrant
  46.   c = 2 * 3.14159
  47.   picOutput.Cls
  48.   picOutput.Scale (-3, 3)-(3, -3)    'Specify coordinate system
  49.   picOutput.Circle (0, 0), 2, , -0.0000001 * c, -0.25 * c
  50.   picOutput.FillStyle = 6            'Cross hatched
  51.   picOutput.FillColor = vbMagenta
  52.   picOutput.Circle (0, 0), 2, , -0.25 * c, -0.5 * c
  53.   picOutput.FillStyle = 1            'Transparent
  54.   picOutput.Circle (0, 0), 2, , -0.5 * c, -0.75 * c
  55.   picOutput.Circle (0, 0), 2, , -0.75 * c, -1 * c
  56. End Sub
  57.